package com.woniu113.junk.site.client;

import com.woniu113.junk.commons.model.Result;
import com.woniu113.junk.site.client.dto.OrderInfo;
import com.woniu113.junk.site.client.dto.PerformanceInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "junk-order",path = "/order")
public interface OrderClient {
    /**
     * 根据订单编号查询订单信息的接口
     */
    @GetMapping("/orderInfo/findById/{orderNum}")
    public Result<OrderInfo> findById(@PathVariable("orderNum") String orderNum);

    /**
     * 查询符合条件的订单特定废品类型的重量.
     */
    @GetMapping("/orderInfo/queryWeight/{orderNum}/{typeId}")
    public Result<Double> queryWeight(@PathVariable("orderNum") String orderNum, @PathVariable("typeId") Integer typeId);

    /**
     * 处理骑手的正常订单统计请求.
     */
    @GetMapping("/performanceInfo/normalAdd/{orderNum}")
    public Result<PerformanceInfo> normalAdd(@PathVariable("orderNum") String orderNum);

    /**
     * 处理骑手的异常订单统计请求.
     */
    @GetMapping("/performanceInfo/abnormalAdd/{orderNum}")
    public Result<PerformanceInfo> abnormalAdd(@PathVariable("orderNum") String orderNum);
}

